import request from '@/api/socialized-servce/index.js' //引入http.js
const api = request
export default {
	// 获取帖子分类
	queryPostVariety(params){
		let url = 'socialized-expert/invitationType/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取帖子
	queryPost(params) {
		let url = 'socialized-expert/invitation/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 查询所有用户
	queryUser(params) {
		let url = 'socialized-system/user/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 查询帖子
	queryQualifiedPost(params) {
		let url = 'socialized-expert/invitation/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 图片
	uploadPic(params) {
		let url = 'socialized-expert/invitationImg/add'
		return api.request(url,'post',{
			...params
		})
	},
	// 发布帖子
	publishPost(params) {
		let url = "socialized-expert/invitation/add"
		return api.request(url,'post',{
			...params
		})
	},
	// 删除帖子
	  delPost(id) {
	    const url = `socialized-expert/invitation/del?id=${id}`
	    return api.request(url,'delete')
	  },
	// 编辑帖子
	editPost(params) {
		const url = `socialized-expert/invitation/edit`
		return api.request(url,'put',{
			...params
		})
	}
}